<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>流程控制</title>
    <style>
        *{margin: 0;padding: 0;list-style-type: none;}
    </style>
</head>
<body>
    <script>
        /*
            条件判断 if 与c一致
        */
       if(false){
            console.log("学习");
       }
       else{
            console.log("不学习，原神，启动")
       }

       //三目运算符
       let age = 18
       age >= 18 ? console.log("R18") : console.log("非R18");

       //switch 
       switch(age){
            case 18:
                console.log("R18")
                break;
            default:
                console.log("输入错误")
                break;
       }
    </script>
</body>
</html>